package com.yunshipei.db;

import android.content.Context;

import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

/**
 * Created by cike on 16/1/15.
 */
public class NotifiDbHelper extends SQLiteOpenHelper {
    public static final String DB_NAME = "NotificationDB.db";
    private static volatile NotifiDbHelper notifiDbHelper = null;
    private SQLiteDatabase dbutil;
    public static String notificationString;
    public static String TABLE_NOTIFI = "notifi";

    public NotifiDbHelper(Context context) {
        super(context, DB_NAME, null, 2);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        dbutil = db;

        /**
         * 提醒
         */
        notificationString = "create table "+ TABLE_NOTIFI + "(_id integer primary key autoincrement," +
                "focus,tip,speech,content,name,dateTime,notifiStatus,datee,dateOrig,time," +
                "timeOrig,repetionTime,delayTime,forwardTime,shake,userId, musicStatus, music,voiceRepore)";
        Log.e("table oncreate", "create table");
        db.execSQL(notificationString);//创建提醒群
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
